﻿Option Strict On

Imports DbDataLib
Imports KUeLib.Buchungen
Imports System.Data.Common


Namespace ServiceDefinitions

    Public MustInherit Class BuchungenDataSerivce
        Inherits ServiceClass

        Private Const TAB_BUCHUNGEN As String = "buchungen"

        Public Sub New(ByVal dataService As DbDataService)
            MyBase.New(dataService)
        End Sub

        Public Overridable Property [DbDataService] As DbDataService
            Get
                Return _dataService
            End Get
            Set(ByVal value As DbDataService)
                _dataService = value
            End Set
        End Property

        Public MustOverride Function GetBuchungById(ByVal buchungId As Integer) As Buchung

        Public MustOverride Sub UpdateBuchung(ByVal b As Buchung)

        Public MustOverride Function InsertBuchung(ByVal b As Buchung) As Buchung

        Public MustOverride Function GetAnzahlBuchungen() As Integer

        Public MustOverride Function BuchungExists(ByVal b As Buchung) As Boolean

        Public MustOverride Function GetAlleBuchungen() As List(Of Buchung)

        Public MustOverride Function GetBuchungenLimit(ByVal startWith As Integer, ByVal count As Integer) As List(Of Buchung)

        Public MustOverride Function GetBuchungenForVertragList(ByVal vertragId As Integer) As List(Of Buchung)

        Public MustOverride Sub DeleteBuchung(ByVal buchungId As Integer)

    End Class

End Namespace